2
天氣顧問(智能體)
PolyU COMP5511Lab 11 | 2026-03-30
00:00

核心概念 — 大腦與雙手

在先前的實驗中,我們見識到大型語言模型(LLM)的強大能力,但也發現一個重大缺陷:它們被困在一個封閉的盒子裡。它們只知道訓練時學到的內容,無法與真實世界互動。

AI 智能體 透過結合兩個不同的組成部分來解決這個問題:

  • 大腦: 即大型語言模型(如 Qwen3-4B),負責理解人類語言、處理邏輯推理,並維持對話上下文。
  • 雙手: 即 Python 程式碼和外部工具(API),能夠主動與真實世界互動,例如查詢天氣、瀏覽網際網路或執行計算。
教導大腦使用雙手
大型語言模型無法自然地「點擊」按鈕或「執行」Python。今天我們的目標是教導大腦識別何時需要協助,並格式化其輸出,使我們的 Python 程式能替它執行工具 它。
A clean, modern conceptual illustration showing a glowing digital brain representing an LLM connected via glowing data lines to a pair of robotic or digital hands manipulating code blocks and gears, representing real-world tools. Minimalist tech aesthetic with light blue and soft orange accent colors.